import axios from '@/libs/request/axios'

/**
 * 获取收款账号信息-多条件
 * @param params
 * @returns {*}
 */
export const getListData = (params) => {
    return axios.request({
        url: '/channel/channelOnline/getAccountInfo',
        method: 'post',
        params: params,
    })
}

/**
 *新增收款账号信息
 * @param params
 * @returns {*}
 */
export function save(params) {
    return axios.request({
        url: '/channel/channelOnline/saveAccountInfo',
        method: 'POST',
        data: params
    })
}

/**
 * 修改收款账号信息
 * @param params
 * @returns {*}
 */
export function update(params) {
    return axios.request({
        url: '/channel/channelOnline/updateAccountInfo',
        method: 'POST',
        data: params
    })
}

/**
 * 删除收款账号信息
 * @param id
 * @param params
 * @returns {*}
 */
export const deleteAccount = (id, params) => {
    return axios.request({
        url: `/channel/channelOnline/deleteAccount/${id}`,
        method: 'DELETE',
        params: params,
    })
};

/**
 *保存发票信息
 * @param params
 * @returns {*}
 */
export function saveInvoice(params) {
    return axios.request({
        url: '/channel/channelOnline/saveInvoiceInfo',
        method: 'POST',
        data: params
    })
}

